﻿package fwk.form.elements 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class ReponseComboBox extends AbstractReponse
	{
		
		

		public function ReponseComboBox(mc:MovieClip = null)
		{

			super(mc);
			
			mc.buttonMode = true;
			mc.addEventListener(MouseEvent.CLICK, onClickItem);
			mc.addEventListener(MouseEvent.MOUSE_OVER, onOverItem);
			mc.addEventListener(MouseEvent.MOUSE_OUT, onOutItem);
			
		}
		
		private function onOutItem(e:Event):void 
		{
			dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OUT));
			mc.gotoAndPlay("out");
		}
		
		private function onOverItem(e:Event):void 
		{
			dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
			mc.gotoAndPlay("over");
		}
		
		private function onClickItem(e:Event):void 
		{
			dispatchEvent(new MouseEvent(MouseEvent.CLICK));
		}
		

	}
	
}